﻿<Application
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:pc="http://schemas.microsoft.com/prototyping/2010/controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	x:Class="CYPlayer.App">
	<Application.Resources>
		<!-- Resources scoped at the Application level should be defined here. -->
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Microsoft.Expression.Prototyping.SketchControls;component/ScrollViewerStyles.xaml"/>
				<ResourceDictionary Source="/CYPlayer.Screens;component/SketchStyles.xaml"/>
				<ResourceDictionary Source="/CYPlayer.Screens;component/Simple Styles.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		<!-- Sketch Button -->
			<Style x:Key="roundButtonStylw" TargetType="{x:Type Button}" BasedOn="{x:Null}">
				<Setter Property="FontFamily" Value="{DynamicResource FontFamily-Sketch}"/>
				<Setter Property="FontSize" Value="{DynamicResource SizeDouble-Sketch}"/>
				<Setter Property="Foreground" Value="{DynamicResource BaseForeground-Sketch}"/>
				<Setter Property="BorderBrush" Value="{DynamicResource BaseBorder-Sketch}"/>
				<Setter Property="Background" Value="{DynamicResource BaseBackground-Sketch}"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
							<Grid x:Name="Grid" Margin="0,0,-33.766,-17.1">
						<!-- Content Presenter is where the text content etc is placed by the control -->
								<pc:SketchRectangleUC x:Name="SketchRectangleUC" BorderBrush="{TemplateBinding BorderBrush}" ExtensionLength="0" ExtensionVariance="0" StrokeWidth="2" SegmentLength="8" Background="{TemplateBinding Background}" SegmentVariance="0.1" SegmentOffset="0.12" FocusVisualStyle="{DynamicResource FocusControl-Sketch}" Radius="2.7999999999999261" Width="Auto" Margin="0,0,-11.9,2.1"/>
								<ContentPresenter HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" Margin="2.698,4.464,2.762,5.3" d:LayoutOverrides="Width" Content="."/>
							</Grid>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Background" TargetName="SketchRectangleUC" Value="{DynamicResource MouseOverBackground-Sketch}"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="True">
									<Setter Property="Background" TargetName="SketchRectangleUC" Value="{DynamicResource PressedBackground-Sketch}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="FontWeight" Value="{DynamicResource FontWeight-Sketch}"/>
				<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusControl-Sketch}"/>
				<Style.Triggers>
					<Trigger Property="IsEnabled" Value="False">
						<Setter Property="Foreground" Value="{DynamicResource DisabledForeground-Sketch}"/>
						<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorder-Sketch}"/>
					</Trigger>
				</Style.Triggers>
			</Style>
			<Style x:Key="TextBoxCYPStyle" TargetType="{x:Type TextBox}">
				<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
				<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
				<Setter Property="AllowDrop" Value="true"/>
				<Setter Property="Foreground" Value="{StaticResource BaseBorder-Sketch}"/>
				<Setter Property="BorderBrush" Value="{StaticResource BaseBorder-Sketch}"/>
				<Setter Property="Background" Value="{StaticResource BaseBackground-Sketch}"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type TextBox}">
							<Grid>
						<!-- The implementation places the Content into the ScrollViewer. It must be named PART_ContentHost for the control to function -->
								<ScrollViewer Style="{DynamicResource ScrollViewer-Sketch2}" x:Name="PART_ContentHost" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" FontFamily="./#Segoe Print" d:IsStaticText="False"/>
							</Grid>
							<ControlTemplate.Triggers>
								<Trigger Property="IsFocused" Value="True">
									<Setter Property="Background" TargetName="PART_ContentHost" Value="#FFBBBBBB"/>
								</Trigger>
								<Trigger Property="IsEnabled" Value="False">
									<Setter Property="Background" TargetName="PART_ContentHost" Value="{DynamicResource DisabledBackground-Sketch}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="FontFamily" Value="{DynamicResource FontFamily-Sketch}"/>
				<Setter Property="FontWeight" Value="{DynamicResource FontWeight-Sketch}"/>
				<Setter Property="FontSize" Value="{DynamicResource SizeDouble-Sketch}"/>
				<Style.Triggers>
					<Trigger Property="IsEnabled" Value="False">
						<Setter Property="Foreground" Value="{DynamicResource DisabledForeground-Sketch}"/>
					</Trigger>
				</Style.Triggers>
			</Style>
		</ResourceDictionary>
	</Application.Resources>
</Application>